/*
 * ECARX Technology Limited is the owner of the copyright and the trade secret of this software.
 * Without permission, no one has the right to obtain, disclose or use this software in any way.
 */
package com.ecarx.systemui.plugin

import org.junit.Assert
import org.junit.Test
import java.text.DecimalFormat

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * @see [Testing documentation](http://d.android.com/tools/testing)
 */
class ExampleUnitTest {
    @Test
    fun temp_format() {

        val temp = 25.5f
        var temp_int = temp.toInt().toString()

        val decimalFormat = DecimalFormat(".0")
        var temp_dec = decimalFormat.format(temp - temp.toInt())

        println(temp_int + "  " + temp_dec)
        Assert.assertEquals(temp_int, "25")
        Assert.assertEquals(temp_dec, ".5")
    }
}